package com.gyg.client;

import com.gyg.returns.RespEntity;
import com.gyg.vo.param.DownloadParam;
import com.gyg.vo.param.FileParam;
import java.util.List;

import com.gyg.vo.param.UpdateFileParam;
import com.gyg.vo.result.FileDownloadResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cloudPictureClient", url = "${cloud.box.url}")
public interface CloudPictureClient {

    /**
     * 确认提交上传图片
     * @param fileParam
     * @return
     */
    @PostMapping("/cloud-picture/upload")
    RespEntity commitPicture(@RequestBody FileParam fileParam);

    /**
     * 图片列表数据
     * @param userId
     * @param pageNum
     * @param pageSize
     * @param content
     * @return
     */
    @GetMapping("/cloud-picture/list")
    RespEntity cloudPictureList(@RequestParam(value = "userId", required = true) Integer userId,
                                @RequestParam(value = "pageNum", required = true) Integer pageNum,
                                @RequestParam(value = "pageSize", required = true) Integer pageSize,
                                @RequestParam(value = "content", required = false) String content);

    /**
     * 编辑图片
     * @param updateFileParam
     * @return
     */
    @PutMapping("/cloud-picture/update")
    RespEntity updatePicture(@RequestBody UpdateFileParam updateFileParam);

    /**
     * 删除图片
     * @param pictureId
     * @return
     */
    @DeleteMapping("/cloud-picture/delete")
    RespEntity deletePicture(@RequestParam(value = "pictureId", required = true) Integer pictureId);

    /**
     * 图片云盘信息
     * @param userId
     * @return
     */
    @GetMapping("/cloud-picture/info")
    RespEntity pictureCloudInfo(@RequestParam(value = "userId", required = true) Integer userId);

    /**
     * 图片下载
     * @param downloadParam
     * @return
     */
    @PostMapping("/cloud-picture/download")
    RespEntity<FileDownloadResult> download(@RequestBody DownloadParam downloadParam);
}
